import models.crawlers.Muztorg;
import models.crawlers.common.ShopCrawler;
import models.entities.ProductEntity;
import org.junit.Test;
import play.test.FunctionalTest;

public class ProductUtility_Tests extends FunctionalTest {
    @Test
    public void ClearDescription_Test() throws Exception {
        ShopCrawler crawler = new Muztorg();
        ProductEntity product = crawler.getProduct("http://www.muztorg.ru/cat/details/D001430/");
        String shortDescription = product.shortDescription;
        assertTrue(shortDescription.length() > 10);
        assertFalse(shortDescription.contains("Артикул:"));
    }
}
